package com.egao.common.module.student.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.egao.common.module.student.entity.StudentInfo;
import com.egao.common.module.student.mapper.StudentInfoMapper;
import com.egao.common.module.student.service.StudentInfoService;
import org.springframework.stereotype.Service;

/**
 * 学生附加信息服务接口实现类
 *
 * @author lym
 */
@Service
public class StudentInfoServiceImpl extends ServiceImpl<StudentInfoMapper, StudentInfo> implements StudentInfoService {

    @Override
    public StudentInfo getByStudentId(Integer studentId) {
        return baseMapper.selectOne(new QueryWrapper<StudentInfo>()
                .eq("student_id", studentId)
                .last("limit 1")
        );
    }

}
